//
//  UILabel+XZLabel.m
//  BabyHouseKeeper
//
//  Created by charles.huang on 16/8/19.
//  Copyright © 2016年 Jeff. All rights reserved.
//

#import "UILabel+XZLabel.h"

@implementation UILabel (XZLabel)

+(UILabel*)initLabelText:(NSString*)text TextColor:(UIColor*)textColor
{
    UILabel* label = [[UILabel alloc] init];
    if ([text isEqual:[NSNull null]]) {
        text = @"";
    }
    label.text = text;
    label.textColor = textColor;
    label.backgroundColor = [UIColor clearColor];
    label.numberOfLines = 0;
    
    return label;
}

+(UILabel*)initLabelText:(NSString*)text Font:(float)font TextColor:(UIColor*)textColor
{
    UILabel* label = [[UILabel alloc] init];
    if ([text isEqual:[NSNull null]]) {
        text = @"";
    }
    label.text = text;
    label.textColor = textColor;
    label.backgroundColor = [UIColor clearColor];
    label.font = [UIFont systemFontOfSize:font];
    label.numberOfLines = 0;
    
    return label;
}

+(UILabel*)initLabel:(CGRect)rect Text:(NSString*)text TextColor:(UIColor*)textColor
{
    UILabel* label = [[UILabel alloc] initWithFrame:rect];
    if ([text isEqual:[NSNull null]]) {
        text = @"";
    }
    label.text = text;
    label.textColor = textColor;
    label.backgroundColor = [UIColor clearColor];
    label.numberOfLines = 0;
    
    return label;
}

+(UILabel*)initLabel:(CGRect)rect Font:(float)font TextColor:(UIColor*)textColor
{
    UILabel* label = [[UILabel alloc] initWithFrame:rect];
    label.textColor = textColor;
    label.backgroundColor = [UIColor clearColor];
    label.font = [UIFont systemFontOfSize:font];
    label.numberOfLines = 0;
    
    return label;
}

+(UILabel*)initLabel:(CGRect)rect Text:(NSString*)text Font:(float)font TextColor:(UIColor*)textColor
{
    UILabel* label = [[UILabel alloc] initWithFrame:rect];
    if ([text isEqual:[NSNull null]]) {
        text = @"";
    }
    label.text = text;
    label.textColor = textColor;
    label.backgroundColor = [UIColor clearColor];
    label.font = [UIFont systemFontOfSize:font];
    label.numberOfLines = 0;
    
    return label;
}

+(UILabel*)initLabel:(CGRect)rect Text:(NSString*)text Font:(float)font TextColor:(UIColor*)textColor BgColor:(UIColor *)bgColor
{
    UILabel* label = [[UILabel alloc] initWithFrame:rect];
    if ([text isEqual:[NSNull null]]) {
        text = @"";
    }
    label.text = text;
    label.textColor = textColor;
    label.backgroundColor = bgColor;
    label.font = [UIFont systemFontOfSize:font];
    label.numberOfLines = 0;
    
    return label;
}


@end
